<template>
	<view class="top">
		<u-icon name="arrow-left" size="36" @click="goToBack"></u-icon>
		<text>{{title}}</text>
	</view>
</template>

<script>
	export default {
		props: ['title'],
		data() {
			return {

			}
		},
		methods: {
			goToBack() {
				uni.navigateBack({
					delta: 1
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.top {
		position: relative;
  	height: 40rpx;
    text-align: center;
    .u-icon {
      position: absolute;
      left: 0;
    }
	}
</style>
